<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <!-- Meta tags -->
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta charset="utf-8"/>
    <meta name="keywords"
          content="个人中心"
    />
    <script>
        addEventListener("load", function () {
            setTimeout(hideURLbar, 0);
        }, false);

        function hideURLbar() {
            window.scrollTo(0, 1);
        }
    </script>
    <link href="${css}/style.css" rel='stylesheet' type='text/css' media="all">
    <link href="//fonts.googleapis.com/css?family=Saira+Condensed:400,500,600,700" rel="stylesheet">
    <link rel="stylesheet" href="${root}/resource/static/layui-v2.5.7/layui/css/layui.css">
    <script src="${js}/jquery.js"></script>
</head>
<body>
<h1 class="header-w3ls">
    Admin Single Page
</h1>
<form action="${root}/updateAdminInfo" method="post" enctype="multipart/form-data">
    <input type="hidden" name="mid" value="${adminInfo.mid}" />
    <div class="online-w3l-form">
        <div class="main-headder">
            <div class="address-agile">
                <div class="using-address">
                    <p class="form-details">日期:</p>
                    <span class="details-list" id="date" style="margin-top: 10px;margin-left: -160px"></span>
                </div>
                <div class="using-address">
                    <p class="form-details">时间:</p>
                    <span class="details-list" id="time" style="margin-top: 10px;margin-left: -160px"></span>
                </div>
            </div>
            <div class="map-grid">
                <img src="${images}/${adminInfo.headphoto}" alt="头像" width="150" height="150" id="head" style="margin-left: 0px;margin-top: 60px">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"
                   style="border:0;background:#00000000;margin-left: 290px">
                上传头像
                <div style="float: left">
                    <input type="file" name="image" style="display: block"/>
                </div>
            </label>
        </div>

        <div class="appointment-w3">
            <div class="main">
                <div class="form-left-w3l">
                    <p class="form-details">昵称:</p>
                    <input type="text" class="top-up" name="name" value="${adminInfo.name}" required="" id="name">
                </div>
            </div>
            <div class="main">
                <div class="form-left-w3l">
                    <p class="form-details">电话:</p>
                    <input type="text" name="phone" value="${adminInfo.phone}" id="tel">
                </div>
            </div>
            <div class="btnn">
                <button class="layui-btn layui-btn-normal" lay-submit
                        lay-filter="userSubmit"
                        style="width: 80%;height: 40px;border-radius: 20px;margin-left: 55px"
                        id="upSub" type="submit"/>
                修改个人信息
            </div>
            <strong class="text-center text-red"><${addAdminInfoError}/strong>
        </div>
    </div>
</form>
<script src="${root}/resource/static/layui-v2.5.7/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['element', 'jquery', 'layer', 'laydate', 'form', 'upload'], function () {
        var $ = layui.jquery
        var date = new Date()
        $('#date').text(date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate())

        setInterval(function () {
            var time = (new Date().getHours()) + ":" + (new Date().getMinutes()) + ":" + (new Date().getSeconds())
            $('#time').text(time)
        }, 10)
    })
</script>
</body>
</html>
